package com.by.common.core.exception;

import java.util.Map;

/**
 * 自定义的验证异常
 */
public class ValidateException extends RuntimeException{

    Map<String,String> errors;//记录验证错误字段的

    public ValidateException(Map errors){
        //调用父类的构造方法
        super("验证异常");
        this.errors=errors;
    }


    public Map<String, String> getErrors() {
        return errors;
    }

    public void setErrors(Map<String, String> errors) {
        this.errors = errors;
    }
}
